<?php

namespace App\Sms;

use App\Sms\Contracts\Sms;
use Illuminate\Support\ServiceProvider;

class SmsServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap the application services.
     *
     * @return void
     */
    public function boot()
    {
        //
    }

    /**
     * Register the application services.
     *
     * @return void
     */
    public function register()
    {
        $sms_conf  = config('sms');
        $default = $sms_conf['default'];
        $driver = $sms_conf['gateways'][$default]['driver'];
        $this->app->singleton(Sms::class,$driver);
    }
}
